package w1022;

public class Test11 {
	public static void main(String[] args) {
		int num=0;
		int sum=0;
       for(int i=18;i<=998;i+=20){
    	   num+=i;
       }
       System.out.println(num);
       for(int j=28;j<=988;j+=20){
    	   sum+=j;
       }
       System.out.println(sum);
       System.out.println(num-sum);
	}
}
